/*
Kakine
ActionScript Framework
Copyright © 2011, PUNY, LLC.

This file is part of KAKINE.

KAKINE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

KAKINE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with KAKINE.  If not, see <http://www.gnu.org/licenses/>.
*/ 
package com.puny.mvc.helpers
{
	import flash.events.IEventDispatcher;
	
	/**
	 * An initializing function, a main function and a closing function will be handled with the following method.
	 * The initializing function is invoked immediately any time. What happens after the initialization depends on a context.
	 * @author Mitsuru
	 * 
	 */
	public interface IHelper
	{
		/**
		 * Start the main function after the initialization.
		 * 
		 */
		function start():void;
		/**
		 * Pause the main function.
		 * 
		 */
		function pause():void;
		/**
		 * Cancel everything without invoking the closing function.  
		 * 
		 */
		function cancel():void;
		/**
		 * Resume the main function only if it's paused.
		 * 
		 */
		function resume():void;
		/**
		 * Cancel the main function and invoke the initializeing function.
		 * 
		 */
		function revert():void;
		/**
		 * Cancel the main function and invoke the closing function.
		 * The difference from <code>cancel()</code> is this method invokes the closing function.
		 */
		function skip():void;
	}
}